import java.util.Stack;

/**
 * @author zhaoren
 * @version 1.0
 * @description 抽象原型类
 * @date 2020/7/30 16:03
 **/
public abstract class Shape implements Cloneable {

    private String id;

    private String type;

    private Stack stack;

    public Stack getStack() {
        return stack;
    }

    public void setStack(Stack stack) {
        this.stack = stack;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    /**
     * jdk默认的native clone方法是进行浅克隆的，可以重写方法为深克隆
     * @return
     * @throws CloneNotSupportedException
     */
    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
